home *** CD-ROM | disk | FTP | other *** search
/ Megadoom II / MEGADOOM II - iso.7z / MEGADOOM II.ISO / doom / editors / map / dmpsmu / source / wstructs.h < prev   
C/C++ Source or Header  |  1994-08-24  |  4KB  |  129 lines

  1. /*
  2.    DooM PostScript Maps Utility, by Frans P. de Vries.
  3.  
  4. Derived from:
  5.  
  6.    Doom Editor Utility, by Brendon Wyber and Raphaδl Quinet.
  7.  
  8.    You are allowed to use any parts of this code in another program, as
  9.    long as you give credits to the authors in the documentation and in
  10.    the program itself.  Read the file README for more information.
  11.  
  12.    This program comes with absolutely no warranty.
  13.  
  14.    WSTRUCTS.H - WAD files data structures.
  15. */
  16.  
  17.  
  18. /*
  19.    this data structure contains the information about the THINGS
  20. */
  21. typedef struct Thing huge *TPtr;
  22. struct Thing
  23. {
  24.    BCINT  xpos;        /* x position */
  25.    BCINT  ypos;        /* y position */
  26.    BCINT  angle;    /* facing angle (0 = east, 90 = north, ...) */
  27.    BCINT  type;        /* thing type */
  28.    BCINT  when;        /* appears when? (bit 4 = multi-player) */
  29. };
  30.  
  31. /*
  32.    this data structure contains the information about the VERTEXES
  33. */
  34. typedef struct Vertex huge *VPtr;
  35. struct Vertex
  36. {
  37.    BCINT  x;        /* X coordinate */
  38.    BCINT  y;        /* Y coordinate */
  39. };
  40.  
  41. /*
  42.    this data structure contains the information about the LINEDEFS
  43. */
  44. typedef struct LineDef huge *LDPtr;
  45. struct LineDef
  46. {
  47.    BCINT  start;    /* from this vertex ... */
  48.    BCINT  end;        /* ... to this vertex */
  49.    BCINT  flags;    /* attributes (bit 0 = impassible, bit 5 = secret, ...) */
  50.    BCINT  type;        /* type to activate special effects (39 & 97 = teleport) */
  51.    BCINT  tag;        /* linedef activates the sector with the same tag */
  52.    BCINT  sidedef1;    /* "right" sidedef */
  53.    BCINT  sidedef2;    /* only if this line adjoins 2 sectors, else -1 */
  54. };
  55.  
  56. /*
  57.    this data structure contains the information about the SIDEDEFS
  58. */
  59. typedef struct SideDef huge *SDPtr;
  60. struct SideDef
  61. {
  62.    BCINT  xoff;        /* X offset for texture */
  63.    BCINT  yoff;        /* Y offset for texture */
  64.    char   tex1[ 8];    /* texture name for the upper part */
  65.    char   tex2[ 8];    /* texture name for the lower part */
  66.    char   tex3[ 8];    /* texture name for the regular part */
  67.    BCINT  sector;    /* adjacent sector */
  68. };
  69.  
  70. /*
  71.    this data structure contains the information about the SEGS
  72. */
  73. typedef struct Seg huge *SEPtr;
  74. struct Seg
  75. {
  76.    SEPtr  next;        /* next Seg in list */
  77.    BCINT  start;    /* from this vertex ... */
  78.    BCINT  end;        /* ... to this vertex */
  79.    UBCINT angle;    /* angle (0 = east, 16384 = north, ...) */
  80.    BCINT  linedef;    /* linedef that this seg goes along */
  81.    BCINT  flip;        /* true if not the same direction as linedef */
  82.    UBCINT dist;        /* distance from starting point */
  83. };
  84.  
  85. /*
  86.    this data structure contains the information about the SSECTORS
  87. */
  88. typedef struct SSector huge *SSPtr;
  89. struct SSector
  90. {
  91.    SSPtr  next;        /* next Sub-Sector in list */
  92.    BCINT  num;        /* number of Segs in this Sub-Sector */
  93.    BCINT  first;    /* first Seg */
  94. };
  95.  
  96. /*
  97.    this data structure contains the information about the SECTORS
  98. */
  99. typedef struct Sector huge *SPtr;
  100. struct Sector
  101. {
  102.    BCINT  floorh;    /* floor height */
  103.    BCINT  ceilh;    /* ceiling height */
  104.    char   floort[ 8];    /* floor texture */
  105.    char   ceilt[ 8];    /* ceiling texture */
  106.    BCINT  light;    /* light level (0-255) */
  107.    BCINT  special;    /* special behaviour (0 = normal, 9 = secret, ...) */
  108.    BCINT  tag;        /* sector activated by a linedef with the same tag */
  109. };
  110.  
  111. /*
  112.    this data structure contains the information about the NODES
  113. */
  114. typedef struct Node *NPtr;
  115. struct Node
  116. {
  117.    BCINT  x, y;            /* starting point */
  118.    BCINT  dx, dy;        /* offset to ending point */
  119.    BCINT  miny1, maxy1,
  120.       minx1, maxx1;        /* bounding rectangle 1 */
  121.    BCINT  miny2, maxy2,
  122.       minx2, maxx2;        /* bounding rectangle 2 */
  123.    BCINT  child1, child2;    /* Node or SSector (if high bit is set) */
  124.    NPtr   node1, node2;        /* pointer if the child is a Node */
  125.    BCINT  num;            /* number given to this Node */
  126. };
  127.  
  128. /* end of file */
  129.